package com.fzg.controller;


import com.fzg.common.enums.ResponseWrapper;
import com.fzg.service.SongListService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;

import org.springframework.web.bind.annotation.RequestParam;
import org.springframework.web.bind.annotation.RestController;

/**
 * <p>
 *  前端控制器
 * </p>
 *
 * @author fzg
 * @since 2022-07-28
 */
@RestController
@RequestMapping("/song-list")
public class SongListController {

    @Autowired
    private SongListService songListService;

    /**
     * 获取推荐的歌单列表
     * @return ResponseWrapper
     */
    @GetMapping("/getRecommendSongList")
    public ResponseWrapper getRecommendSongList(@RequestParam String searchKey){
        return songListService.getRecommendSongList(searchKey);
    }

    /**
     * 获取这个歌单的所有信息
     * @return ResponseWrapper
     */
    @GetMapping("/getThisSongListAllInfo")
    public ResponseWrapper getThisSongListAllInfo(@RequestParam String searchKey, @RequestParam Integer songListAid){
        return songListService.getThisSongListAllInfo(searchKey,songListAid);
    }

}
